package com.um.jdy.platform.market.entity.dto;

import com.um.springboot.starter.orm.params.PageDTO;
import com.um.springboot.starter.orm.params.PageParams;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

@Data
public class ActivityPageDTO extends PageDTO {

    @ApiModelProperty("活动类型")
    protected String type;

    @ApiModelProperty("活动标题")
    protected String title;

    @ApiModelProperty("状态")
    protected String status;

    @Override
    public PageParams toPageParams() {
        PageParams pageParams = toPageParams(
                new String[]{"type", "title", "status"},
                new String[]{"type", "title", "status"});
        pageParams.getCondition().put("orderby", "create_time desc");
        return pageParams;
    }
}
